/*
* $Id: ResizeHelper.h 2 2009-12-23 13:58:02Z volok-aleksej@yandex.ru $
*
* Copyright 2009 by Volokitin Aleksey
* All rights reserved
*
*/
#ifndef _RESIZE_HELPER_H_
#define _RESIZE_HELPER_H_

class CResizeHelper
{
	int m_level;
	struct sizeBlock{
		static const int nSizeBlock = 100;
		int size;
		std::vector<sizeBlock*> m_aChildBlock;
		sizeBlock();
		sizeBlock(int size);
		~sizeBlock();
		bool AddSizeRow(int size, int level);
		std::vector<int> GetPosRow(int posCursor, int& offset);

		sizeBlock* m_pResizeBlock;
		void BeginResize(int posCursor);
		int SetSize(int cy);
		void EndResize();
		void Reset();
	};
	sizeBlock* m_pCurBlock;
public:
	CResizeHelper();
	~CResizeHelper();
public:
	void AddSizeRow(int size);
	int GetPosRow(int posCursor, int& offset);
	int GetSize();
	void BeginResizeRow(int posCursor);
	void SetSize(int cy);
	void EndResizeRow();
	void Reset();
};

#endif/*_RESIZE_HELPER_H_*/